import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

const state = {
  isShowPagePopup: false,
  isShowApiPopup: false,
  isShowApiDetail: false,
  treeData: [],
  apiDetail: {}
};

const mutations = {
  changePagePopupStatus(state) {
    state.isShowPagePopup = !state.isShowPagePopup;
  },
  changeApiPopupStatus: function (state) {
    state.isShowApiPopup = !state.isShowApiPopup;
  },
  openApiDetailStatus: function (state) {
    state.isShowApiDetail = true;
  }
};

export default new Vuex.Store({
  state,
  mutations,
  actions: {}
})
